<template>
  <div class="ma-content-block lg:flex justify-between p-4">
    <!-- CRUD 组件 -->
    <ma-crud :options="options" :columns="columns" ref="crudRef">
    </ma-crud>
  </div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import financialTopDeptMoney from '@/api/financial/financialTopDeptMoney'
import { Message } from '@arco-design/web-vue'
import tool from '@/utils/tool'
import * as common from '@/utils/common'

const crudRef = ref()




const options = reactive({
  id: 'flyos_financial_top_dept_money',
  rowSelection: {
    showCheckedAll: true
  },
  pk: 'id',
  operationColumn: true,
  operationWidth: 160,
  formOption: {
    viewType: 'modal',
    width: 600
  },
  api: financialTopDeptMoney.getList,
  add: {
    show: true,
    api: financialTopDeptMoney.save,
    auth: ['financial:topDeptMoney:save']
  },
  edit: {
    show: true,
    api: financialTopDeptMoney.update,
    auth: ['financial:topDeptMoney:update']
  },
  delete: {
    show: true,
    api: financialTopDeptMoney.deletes,
    auth: ['financial:topDeptMoney:delete']
  }
})

const columns = reactive([
  {
    title: "",
    dataIndex: "id",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    commonRules: {
      required: true,
      message: "请输入"
    }
  },
  {
    title: "公司",
    dataIndex: "dept_id",
    formType: "input",
    search: true
  },
  {
    title: "余额",
    dataIndex: "money",
    formType: "input",
    search: true
  },
  {
    title: "账单日",
    dataIndex: "bill_day",
    formType: "input",
    search: true
  },
  {
    title: "结算日",
    dataIndex: "settle_day",
    formType: "input",
    search: true
  }
])
</script>
<script> export default { name: 'financial:topDeptMoney' } </script>